﻿@model EnterpriseFund.Model.SpecificAdjust
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<style>
    .tableStyle
{
	width: 100%;
	border: solid 1px black;
		padding: 6px 5px;
	border-collapse: collapse;
}
.tableStyle td
{
}

.tableStyle .tdClass
{
	padding: 0px;
  padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle th
{
	text-align: right;
	padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle .button
{
	margin: 2px 0px 0px 2px;
	float: left;
}

text{border:1px solid #aecaf0;}

    </style>
    <script type="text/javascript">

        $(document).ready(function () {
            $("#toolMenu").smartFloat();
            $("#tabs").tabs();
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
            }
            if (hdjsAlert == "操作成功") {
                lpModal.Hide();
                if ('@ViewData["type"]' == "EDIT") {
                    window.location.href = rootPath + '/SpecificAdjustManage/';
                }
            }
        }
        );

        function Save() {
            var a = $("#hidType").val();
            if (a == 'NO') {
                alert('未选择相关单位！');
            }
            else {
                form1.submit();
            }
        }

        function search() {
            window.location.href = rootPath + '/SpecificAdjustManage/SpecificAdjustEdit?NSRBM=' + NSRBMQ.GetText();
        }

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSave":
                    {
                        Save();
                        break;
                    }
                case "btnback":
                    {
                        window.location.href = rootPath + '/SpecificAdjustManage/';
                        break;
                    }
            }

        }
        function txchg(s, e) {
            var stringout = s.GetText().match(/^(-)?\d+(\.\d{1,2})?/);
            if (stringout != null & stringout != "" & stringout != "undefined") {
                s.SetText(stringout[0]);
            }
            else {
                alert("请输入正确的调整金额");
            }
        }

        function keyPress() {

            var pts = document.getElementsByName("NSRBMQ");

            if (event.keyCode && event.keyCode == 13 && pts[1] == document.activeElement) {

                search();
            }
        }
   
    </script>
</head>
<body onkeypress="keyPress()">
    @using (Html.BeginForm("Save", "SpecificAdjustManage", FormMethod.Post, new { id = "form1" }))
    {
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnback";
           item.Text = "返回";
           item.Image.Url = Url.Content("~/Content/ControlImages/back.png");
       });

       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
       
        <table align="center" style="width: 100%" class="tableForm">
            <tr>
                <td align="right" style="width: 35%; text-align: right;" class="tdClass" id="5">
                    纳税人编码:
                </td>
                <td style="text-align: left; vertical-align: middle;width: 30%; " class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRBMQ";
          settings.Width = System.Web.UI.WebControls.Unit.Pixel(300);

      }).GetHtml()
                </td>
                <td class="tdClass" style="width: 35%; text-align: left;" >
                    @Html.DevExpress().Button(settings =>
            {

                settings.Name = "btnSearch";
                settings.Text = "查询";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                settings.ClientSideEvents.Click = "search";
            }).GetHtml()
                    @*     @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnUndo";
                settings.Text = "重置";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                settings.ClientSideEvents.Click = "undo";
            }).GetHtml()*@
                </td>
            </tr>
        </table>
        <br />
        <table align="center" class="tableForm" style="width: 100%">
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    纳税人名称:
                </td>
                <td class="tdClass"  colspan="3">
                    @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "NSRMC";
     settings.Text = Model.NSRMC;
     settings.Enabled = false;
     settings.Width = System.Web.UI.WebControls.Unit.Percentage(91);

 }).GetHtml()
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    纳税人编码:
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "NSRBM";
     settings.Text = Model.NSRBM;
     settings.Enabled = false;
     settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);
     settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
                </td>
                <td align="right" style="width: 150px" class="tdClass">
                    资金项目:
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "FFinancePropName";
     settings.Text = Model.FFinancePropName;
     settings.Enabled = false;
     settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);

 }).GetHtml()
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    企业类别:
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "FEnterprisePropName";
     settings.Text = Model.FEnterprisePropName;
     settings.Enabled = false;
     settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);

 }).GetHtml()
                </td>
                <td align="right" style="width: 150px" class="tdClass">
                    期号:
                </td>
                <td class="tdClass">
                    @Html.DevExpress().ComboBox(settings =>
 {
     settings.Name = "FIssueID";
     //settings.Text = Model.FIssueNo;
     settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);
     settings.Properties.TextField = "FIssueNo";
     settings.Properties.ValueField = "FIssueID";

 }).BindList(ViewData["IssueList"]).Bind(Model.FIssueID).GetHtml()
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    调整类型:
                </td>
                <td class="tdClass">
                    @Html.DevExpress().ComboBox(settings =>
{
    settings.Name = "FSpecialAdjustClsNo";
    settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
    settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);
    settings.Properties.TextField = "FSpecialAdjustName";
    settings.Properties.ValueField = "FSpecialAdjustClsNo";
}).BindList(ViewData["SpecialAdjustClsList"]).Bind(Model.FSpecialAdjustClsNo).GetHtml()
                </td>
                <td align="right" style="width: 150px" class="tdClass">
                    调整金额:
                </td>
                <td class="tdClass">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "FAdjustAmount";
     settings.Text = string.IsNullOrEmpty(Model.FAdjustAmount.ToString()) ? "0" : (Model.FAdjustAmount / 10000).ToString();
     settings.Width = System.Web.UI.WebControls.Unit.Pixel(200);
     settings.Properties.ClientSideEvents.TextChanged = "txchg";
     //  settings.Properties.DisplayFormatString = "#.##";

     //  settings.Properties.DisplayFormatInEditMode= true;
     //settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     //settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
                            </td>
                            <td align="left" style="text-align: left">
                                万元
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    备注:
                </td>
                <td class="tdClass" colspan="3"  >
                    @Html.DevExpress().Memo(settings =>
                   {
     settings.Name = "FNote";
     settings.Text = Model.FNote;
     settings.Width = System.Web.UI.WebControls.Unit.Percentage(91);
     settings.Height = System.Web.UI.WebControls.Unit.Pixel(40);
     settings.Properties.Rows = 2;

              }).GetHtml()
                </td>
            </tr>
        </table>
        <div id="tabs" class="div">
            <ul>
                <li><a href="#TaxData">历史调整记录</a></li>
            </ul>
            <div id="TaxData" style="height: 550px">
                <iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='@Url.Action("FormerYearSpecificAdjustShow", "SpecificAdjustManage", new { NSRDZDAH = Model.NSRDZDAH })'>
                </iframe>
            </div>
        </div> 

        @Html.Hidden("hidType", ViewData["type"])
        @Html.Hidden("NSRBM", ViewData["NSRBM"])
        @Html.Hidden("NSRDZDAH", Model.NSRDZDAH)
        @Html.Hidden("FSpecificAdjustNo", Model.FSpecificAdjustNo)
        @Html.Hidden("FYear", Model.FYear)
        @Html.Hidden("FEnterprisePropNo", Model.FEnterprisePropNo)
        @Html.Hidden("FFinancePropNo", Model.FFinancePropNo)
        @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))
    }
    @*@Html.DevExpress().PageControl(
    settings =>
    {
        settings.Name = "tabCtlGroup";
        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
        //settings.Height = System.Web.UI.WebControls.Unit.Pixel(600);
        settings.Styles.Content.Border.BorderWidth = 0;
        settings.TabPages.Add("税款数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditFormShowDate", "TaxAuditForm", new { NSRBM = ViewData["NSRBM"], beginDate = ViewData["beginDate"], endDate = ViewData["endDate"] }) + "'></iframe>");
        settings.TabPages.Add("调整数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditAdjustIndex", "TaxAuditForm") + "'></iframe>");
    }).GetHtml()
*@
    <script>
        lp.Hide();
    </script>
</body>
</html>
